package com.airticketbooking.mapper;

import com.airticketbooking.common.domain.PageQuery;
import com.airticketbooking.po.Employee;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;




@Mapper
public interface EmployeeMapper {



	@Select("SELECT * FROM airticketbooking.employee WHERE employee_name = #{employeeName}")
	Employee getByEmployeeName(String employeeName);


	@Insert("INSERT INTO airticketbooking.employee(employee_name, gender, hire_date, email, password, phone_number, state, country, salary, status) " +
			"VALUES(#{employeeName}, #{gender}, #{hireDate}, #{email}, #{password}, #{phoneNumber}, #{state}, #{country}, #{salary}, #{status})")
	void add(Employee employee);

	void modify(Employee employee);

	@Select("SELECT * FROM airticketbooking.employee WHERE employee_id = #{employeeId}")
	Employee getById(Integer employeeId);

	Page<Employee> getempPage(PageQuery pageQuery);
}
